﻿using System;
using System.ServiceModel;
using Soul.Request;
using Soul.Command;

namespace Client
{
    class Program
    {
        static void Main(string[] args)
        {
            InstanceContext instanceContext = new InstanceContext(new CommandRequestCallback());
            using (DuplexChannelFactory<IRequestCenter> channelFactory = new DuplexChannelFactory<IRequestCenter>(instanceContext, "RequestCenter"))
            {
                IRequestCenter proxy = channelFactory.CreateChannel();
                
                using (proxy as IDisposable)
                {
                    CommandRequestContext context = new CommandRequestContext(new CommandArgument(new CommandIdentity()));
                    RequestContext c = new RequestContext();
                    proxy.Push(c);
                    Console.Read();
                }
            }
        }
    }
}
